package com.cnhis.cloudhealth.clinical.clidoctor.clinicaldoctoradviceeditor.dao;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.cnhis.cloudhealth.clinical.clidoctor.clinicaldoctoradviceeditor.mapper.CliVao1;
import com.cnhis.cloudhealth.commons.dao.BaseDao;
import com.cnhis.cloudhealth.commons.utils.BaseVO;
import java.util.HashMap;
import com.cnhis.cloudhealth.commons.utils.Page;

@Repository
public class DoctorAdviceEditorDao extends BaseDao
{
    
    public Page queryItemExecuteOffice(int currentPage, int pageSize)
        throws Exception
    {
        return this.queryForPage("DoctorAdviceEditor.queryItemExecuteOffice",
            null,
            currentPage,
            pageSize,
            "DoctorAdviceEditor.queryItemExecuteOfficeCount");
    }
    
    public CliVao1 insertByVo(CliVao1 vo)
        throws Exception
    {
        if (vo == null)
            return null;
        return (CliVao1)insert("DoctorAdviceEditor.insertByVo", (BaseVO)vo);
    }
    
    public List storageDoctorAdviceRecord()
        throws Exception
    {
        return this.queryForList("DoctorAdviceEditor.storageDoctorAdviceRecord", null);
    }
    
    public List queryClinicalPatientinformation(Map map)
        throws Exception
    {
        return this.queryForList("DoctorAdviceEditor.queryClinicalPatientinformation", map);
    }
    
    public List storageNewDiagnosisOutRecord(Map map)
        throws Exception
    {
        return this.queryForList("DoctorAdviceEditor.storageNewDiagnosisOutRecord", map);
    }
    
    public Page storageNewDiagnosisHospitalRecord(Map map, int currentPage, int pageSize)
        throws Exception
    {
        return this.queryForPage("DoctorAdviceEditor.storageNewDiagnosisHospitalRecord",
            map,
            currentPage,
            pageSize,
            "DoctorAdviceEditor.storageNewDiagnosisHospitalRecordCount");
    }
    
    public Page personalOftenList(Map map, int currentPage, int pageSize)
        throws Exception
    {
        return this.queryForPage("DoctorAdviceEditor.personalOftenList",
            map,
            currentPage,
            pageSize,
            "DoctorAdviceEditor.personalOftenListCount");
    }
    
    public List personalOftenList(Map map)
        throws Exception
    {
        return this.queryForList("DoctorAdviceEditor.personalOftenList",map);
    }
    
    public Page personalTherapeuticRegimen(Map map, int currentPage, int pageSize)
        throws Exception
    {
        return this.queryForPage("DoctorAdviceEditor.personalTherapeuticRegimen",
            map,
            currentPage,
            pageSize,
            "DoctorAdviceEditor.personalTherapeuticRegimenCount");
    }
    
    public List requestNote(Map map)
        throws Exception
    {
        return this.queryForList("DoctorAdviceEditor.requestNote",map);
    }
    
    public List requestNoteDetailItem(Map map)
        throws Exception
    {
        return this.queryForList("DoctorAdviceEditor.requestNoteDetailItem",map);
    }
    
    public List rapeuticSchedule(Map map)
        throws Exception
    {
        return this.queryForList("DoctorAdviceEditor.rapeuticSchedule", map);
    }
    
    public List treeList(Map map)
        throws Exception
    {
        return this.queryForList("DoctorAdviceEditor.treeList", map);
    }
    
    public Page classificationRetrieval(Map map, int currentPage, int pageSize)
        throws Exception
    {
        String bda01 = map.get("lbda01").toString();
        if("E".equals(bda01))
        {
            return this.queryForPage("DoctorAdviceEditor.classificationRetrievalE", map, currentPage, pageSize);
        }
        else if("L".equals(bda01))
        { 
            return this.queryForPage("DoctorAdviceEditor.classificationRetrievalL", map, currentPage, pageSize);
        }
        else if("S".equals(bda01))
        {
            return this.queryForPage("DoctorAdviceEditor.classificationRetrievalS", map, currentPage, pageSize);
        }
        else if("A".equals(bda01)||"Z".equals(bda01)||"N".equals(bda01)||"T".equals(bda01))
        {
            return this.queryForPage("DoctorAdviceEditor.classificationRetrievalT", map, currentPage, pageSize);
        }
        else
        {
            if("1".equals(map.get("value106")))
            {
                return this.queryForPage("DoctorAdviceEditor.classificationRetrieval_kucui", map, currentPage, pageSize);
            }
            else
            {
                return this.queryForPage("DoctorAdviceEditor.classificationRetrieval", map, currentPage, pageSize);
            }
        }
    }
    
    public List checkDrugstore0(Map map)
        throws Exception
    {
        return this.queryForList("DoctorAdviceEditor.checkDrugstore0", map);
    }
    
    public List checkDrugstore1(Map map)
        throws Exception
    {
        return this.queryForList("DoctorAdviceEditor.checkDrugstore1", map);
    }
    
    public List checkDrugstore2or3(Map map)
        throws Exception
    {
        return this.queryForList("DoctorAdviceEditor.checkDrugstore2or3", map);
    }
    
    public String getABC02(Map map)
        throws Exception
    {
        return (String)this.queryToObject("DoctorAdviceEditor.getABC02", map);
    }
    
    public String getABC021(Map map)
        throws Exception
    {
        return (String)this.queryToObject("DoctorAdviceEditor.getABC021", map);
    }
    
    public List queryFeeDetail(Map map)
        throws Exception
    {
        return this.queryForList("DoctorAdviceEditor.queryFeeDetail", map);
    }
    
    public String getABC02Param1(Map map)
        throws Exception
    {
        return (String)queryForExtObject("DoctorAdviceEditor.getABC02Param1", map);
    }
    
    public String getABC02Param2(Map map)
        throws Exception
    {
        return (String)queryForExtObject("DoctorAdviceEditor.getABC02Param2", map);
    }
    
    public List paramters(Map map)
        throws Exception
    {
        return queryForList("DoctorAdviceEditor.paramters", map);
    }
    
    public List queryMedicineAdviceFeeDetail(Map map)
        throws Exception
    {
        return queryForList("DoctorAdviceEditor.queryMedicineAdviceFeeDetail", map);
    }
    
    public List unSendAdviceValuationPrice(Map map)
        throws Exception
    {
        return queryForList("DoctorAdviceEditor.unSendAdviceValuationPrice", map);
    }
    
    public Page queryItemCondition(Map map, int currentPage, int pageSize)
        throws Exception
    {
        return queryForPage("DoctorAdviceEditor.queryItemCondition", map, currentPage, pageSize);
    }
    
    @SuppressWarnings("unchecked")
    public List<Map<String, Object>> queryBBY1ByVAF01(HashMap map)
        throws Exception
    {
        return queryForList("DoctorAdviceEditor.queryBBY1ByVAF01", map);
    }

    @SuppressWarnings("unchecked")
    public List<Map<String, Object>> queryVBQ1ByCBM01(HashMap map) throws Exception
    {
        return queryForList("DoctorAdviceEditor.queryVBQ1ByCBM01", map);
    }

    public List personalOftenListXiyao(HashMap map) throws Exception
    {
        return this.queryForList("DoctorAdviceEditor.personalOftenListXiyao",map);
    }

    public List personalOftenListZhiliao(HashMap map) throws Exception
    {
        return this.queryForList("DoctorAdviceEditor.personalOftenListZhiliao",map);
    }

    public List personalOftenListShoushu(HashMap map) throws Exception
    {
        return this.queryForList("DoctorAdviceEditor.personalOftenListShoushu",map);
    }

    public List personalOftenListJiancha(HashMap map) throws Exception
    {
        return this.queryForList("DoctorAdviceEditor.personalOftenListJiancha",map);
    }

    public List personalOftenListJianyan(HashMap map) throws Exception
    {
        return this.queryForList("DoctorAdviceEditor.personalOftenListJianyan",map);
    }

    public List personalOftenListZhongyao(HashMap map) throws Exception
    {
        return this.queryForList("DoctorAdviceEditor.personalOftenListZhongyao",map);
    }

    public List queryYangben(HashMap map) throws Exception
    {
        return this.queryForList("DoctorAdviceEditor.queryYangben",map);
    }

    public List bdo1List(Map map) throws Exception
    {
        return this.queryForList("DoctorAdviceEditor.bdo1List",map);
    }

    public List bbx13List(Map map) throws Exception
    {
        return this.queryForList("DoctorAdviceEditor.bbx13List",map);
    }

    public List checkDrugstore0New(HashMap map) throws Exception
    {
        return this.queryForList("DoctorAdviceEditor.checkDrugstore0New", map);
    }

    public List checkDrugstore1New(HashMap map) throws Exception
    {
        return this.queryForList("DoctorAdviceEditor.checkDrugstore1New", map);
    }

    public List checkDrugstore2or3New(HashMap map) throws Exception
    {
        return this.queryForList("DoctorAdviceEditor.checkDrugstore2or3New", map);
    }

    public List getVaf1Byvaf01a(HashMap map) throws Exception
    {
        return this.queryForList("DoctorAdviceEditor.getVaf1Byvaf01a", map);
    }

    public List classificationretrieval_fangan(HashMap map) throws Exception
    {
        return this.queryForList("DoctorAdviceEditor.classificationretrieval_fangan", map);
    }

    public List jiansuoFangan(HashMap map) throws Exception
    {
        return this.queryForList("DoctorAdviceEditor.jiansuoFangan", map);
    }

    public List treeList1(HashMap map) throws Exception
    {
        return this.queryForList("DoctorAdviceEditor.treeList1", map);
    }

    public List storageNewDiagnosisOutRecord1(HashMap map) throws Exception
    {
        return this.queryForList("DoctorAdviceEditor.storageNewDiagnosisOutRecord1", map);
    }

    public List personalOftenListCailiao(HashMap map) throws Exception
    {
        return this.queryForList("DoctorAdviceEditor.personalOftenListCailiao",map);
    }

    public List checkdrugstoreNew_cailiao(HashMap map) throws Exception
    {
        return this.queryForList("DoctorAdviceEditor.checkdrugstoreNew_cailiao", map);
    }

    public Page classificationRetrieval_kucui(Map map, int currPage, int pageSize)
    {
        // TODO Auto-generated method stub
        return null;
    }
}
